package com.kele.service.impl;

import com.kele.dao.CommentDao;
import com.kele.domain.Comment;
import com.kele.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Resource
    CommentDao commentDao;
    @Override
    public List<Comment> findComments(int pageNum,int dataNums) {
        return commentDao.findComments(pageNum, dataNums);
    }

    @Override
    public Comment findCommentt(int blogid) {
        return commentDao.findCommentt(blogid);
    }

    @Override
    public int addComment(Comment comment) {
        return commentDao.addComment(comment);
    }

    @Override
    public List<Comment> findComment(int blogid) {
        return commentDao.findComment(blogid);
    }

    @Override
    public int deleteComment(int commentid) {
        return commentDao.deleteComment(commentid);
    }
}
